use warnings;
use Test::More 'no_plan';
use Inline C;

isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');
isnt(timer_get_t(), 0, 'get timer_get()');

$num = 1;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 2;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 3;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 4;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 5;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
$num = 6;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 7;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 8;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 9;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();
$num = 10;
timer_start_t($num);
is(get_cnt_t(), $num, 'test timer_start()');
reset_cnt_t();

__END__
__C__

#include "../../../../mac/timer.h"
#include "../../stub/timer_stub.c"
#include "timer_test.c"


int timer_get_t()
{
    return timer_get_test();
}

int timer_start_t(int num)
{
    return timer_start_test(num);
}

int get_cnt_t()
{
    return get_cnt_test();
}

int reset_cnt_t()
{
    return reset_cnt_test();
}

